<div  class=" admin-content">
    <div class="admin-biaogelist">

        <div class="listbiaoti am-cf">
            <ul class="am-icon-users">{{title}}</ul>

            <dl class="am-icon-home" style="float: right;">当前位置： 首页 > <a href="#">日清管理</a></dl>
            <dl>
                <button type="button" id="addDayclear" ng-click="openAddaddDayclearModal()" class="am-btn am-btn-success am-round am-btn-xs am-icon-plus" > 新增日计划</button>
            </dl>
            <dl>
                <label>工号</label>
                <input type="text" class="input-medium search-query" ng-model="dayclearWhere.jobnum"
                       placeholder="工号" >
            </dl>
            <dl>
                <label>起始</label>
                <input type="text" class="input-medium search-query" ng-model="dayclearWhere.startDate" id="startDatetimepicker"
                       placeholder="起始">
            </dl>
            <dl>
                <label>终止</label>
                <input type="text" class="input-medium search-query" ng-model="dayclearWhere.endDate" id="endDatetimepicker" placeholder="终止">
            </dl>
            <dl>
                <button type="submit" class="btn" ng-click="selectWhere(dayclearWhere)">查询</button>
            </dl>

            <!--这里打开的是新页面-->
</div>
<form class="am-form am-g">
            <table width="100%" class="am-table am-table-bordered am-table-radius am-table-striped">
                <thead>
                <tr class="am-success">
                    <th class="table-check"><input type="checkbox" /></th>

                    <th class="table-author am-hide-sm-only">部门</th>
                    <th class="table-title">姓名</th>
                    <th class="table-type">星期</th>
                    <th class="table-author am-hide-sm-only">日期</th>
                    <th class="table-author am-hide-sm-only">事件任务</th>
                    <th class="table-date am-hide-sm-only">日清结果</th>
                    <th class="table-date am-hide-sm-only">未达成率</th>
                    <th class="table-date am-hide-sm-only">备注</th>
                    <th class="table-date am-hide-sm-only">周汇总率</th>
                    <th class="table-date am-hide-sm-only">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in list">
                    <td><input type="checkbox" /></td>

                    <td>{{item.employee.depart.name}}</td>
                    <td>{{item.employee.name}}</td>
                    <td ng-if="item.temp=='1'">星期一</td>
                    <td ng-if="item.temp=='2'">星期二</td>
                    <td ng-if="item.temp=='3'">星期三</td>
                    <td ng-if="item.temp=='4'">星期四</td>
                    <td ng-if="item.temp=='5'">星期五</td>
                    <td ng-if="item.temp=='6'">星期六</td>
                    <td ng-if="item.temp=='0'">星期六</td>
                    <td class="am-hide-sm-only">{{item.date}}</td>
                    <td class="am-hide-sm-only">{{item.task}}</td>
                    <td ng-if="item.result=='0'">处理中</td>
                    <td ng-if="item.result=='1'">已完成</td>
                    <td class="am-hide-sm-only">{{item.incomplete_rate}}</td>
                    <td class="am-hide-sm-only">{{item.remark}}</td>
                    <td class="am-hide-sm-only">{{item.week_rate}}</td>
                    <td>
                        <div class="am-btn-toolbar">
                            <div class="am-btn-group am-btn-group-xs">
                                <button ng-click="openDayclearDataModal('act_52300015')" class="am-btn am-btn-default am-btn-xs am-text-success am-round" title="查询该员工本月记录"><span class="am-icon-search"></span> </button>
                                <button ng-click="selectDayclear('act_52300015')" class="am-btn am-btn-default am-btn-xs am-text-secondary am-round" data-am-modal="{target: '#my-popups'}" title="修改"><span class="am-icon-pencil-square-o" ></span></button>
                                <button ng-click="delete(item.id)" class="am-btn am-btn-default am-btn-xs am-text-danger am-round"  title="删除"><span class="am-icon-trash-o"></span></button>
                            </div>
                        </div>
                    </td>
                </tr>

                </tbody>
            </table>

    <!--分页页码-->
    <ul class="am-pagination am-fr">
        <div class="box-footer no-border">
            <pagination-component total-items="dayclearList.totalCounts"
                                  current-page="dayclearList.pageIndex"
                                  page-size="dayclearList.pageSize"
                                  select-page="NextListData(pageIndex)">
            </pagination-component>
        </div>
    </ul>
            <div class="am-btn-group am-btn-group-xs">

            </div>
            <hr />
            <!--<p>注：.....</p>-->
</form>

    </div>

</div>
</div>




<div class="modal fade" id="addDayclearModal"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="z-index:9999;">
        <div class="modal-content">
            <div class="modal-header">

                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>

                <h4 class="modal-title" id="dayclearModalLabel">
                    日清信息填写
                </h4>
            </div>
            <div class="modal-body">
                <form role="form">
                    <div class="form-group">
                        <label >部门</label>
                        <input type="text" ng-model="'研发部'" class="form-control"
                               placeholder="部门">
                        <input type="hidden" class="form-control" >
                    </div>

                    <div class="form-group">
                        <label >姓名</label>
                        <input ng-model="'刘承军'" type="text" class="form-control"
                                placeholder="名字">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>日期</label>
                        <input  class="form-control" type="text" ng-model="addDayclearData.date" id="datetimepicker">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>事件任务</label>
                        <input  class="form-control" type="text" ng-model="addDayclearData.task"
                                placeholder="事件任务">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>日清结果</label>
                        <select ng-model="addDayclearData.result" class="form-control">
                            <option ng-repeat="res in results" value="{{ res.value }}">{{ res.name }}</option>
                        </select>
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>未达成率</label>
                        <input ng-model="addDayclearData.incomplete_rate" type="text" class="form-control"
                               placeholder="未达成率">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>备注</label>
                        <input ng-model="addDayclearData.remark" type="text" class="form-control"
                               placeholder="备注">
                        <input type="hidden" class="form-control" >
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>

                <button type="button" id="addDaycl" ng-click="addDayclear(addDayclearData)" class="btn btn-primary">
                 		   提交
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<div class="modal fade" id="dayclearModal"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg" style="z-index:9999;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="nodeModalLabel">

              	   	{{ startDay }}-{{ endDay }}-{{ weekDay }}

                </h4>
            </div>
            <div class="modal-body">
                <table class="table table-striped">
                    <thead>
                    <tr class="table-author am-hide-sm-only" style="border: 1px solid blue;">
                        <td>
                            <table class="table table-striped">
                                <tr class="table-author am-hide-sm-only" style="border: 1px solid blue;">
                                    <th class="table-author am-hide-sm-only" style="border: 1px solid blue;">部门</th>
                                    <th class="table-author am-hide-sm-only" style="border: 1px solid blue;">姓名</th>
                                </tr>
                                <tr class="table-author am-hide-sm-only" style="border: 1px solid blue;">
                                    <th class="table-author am-hide-sm-only" style="border: 1px solid blue;">{{ dayclears[0].employee.depart.name }}</th>
                                    <th class="table-author am-hide-sm-only" style="border: 1px solid blue;">{{ dayclears[0].employee.name }}</th>
                                </tr>
                            </table>
                        </td>
                        <td colspan="5" class="table-author am-hide-sm-only" style="border: 1px solid blue;">
                            <table class="table table-striped">
                                <tr>
                                    <th class="table-author am-hide-sm-only" style="border: 1px solid blue;">星期</th>
                                    <th class="table-author am-hide-sm-only" style="border: 1px solid blue;">事件任务</th>
                                    <th class="table-author am-hide-sm-only" style="border: 1px solid blue;">日清结果</th>
                                    <th class="table-author am-hide-sm-only" style="border: 1px solid blue;">未达成率</th>
                                    <th class="table-author am-hide-sm-only" style="border: 1px solid blue;">备注</th>
                                </tr>
                                <tr ng-repeat="dayclear in dayclears">
                                    <th ng-if="dayclear.temp=='1'" class="table-author am-hide-sm-only">星期一</th>
                                    <th ng-if="dayclear.temp=='2'" class="table-author am-hide-sm-only">星期二</th>
                                    <th ng-if="dayclear.temp=='3'" class="table-author am-hide-sm-only">星期三</th>
                                    <th ng-if="dayclear.temp=='4'" class="table-author am-hide-sm-only">星期四</th>
                                    <th ng-if="dayclear.temp=='5'" class="table-author am-hide-sm-only">星期五</th>
                                    <th ng-if="dayclear.temp=='6'" class="table-author am-hide-sm-only">星期六</th>
                                    <th ng-if="dayclear.temp=='0'" class="table-author am-hide-sm-only">星期日</th>
                                    <td class="table-author am-hide-sm-only" style="border: 1px solid red;">
                                        <input ng-model="dayclear.task" type="text"
                                               placeholder="事件任务">
                                    </td>
                                    <td class="table-author am-hide-sm-only" style="border: 1px solid red;">
                                        <select ng-model="dayclear.result">
                                            <option ng-repeat="res in results" value="{{ res.value }}">{{ res.name }}</option>
                                        </select>
                                    </td>
                                    <td class="table-author am-hide-sm-only" style="border: 1px solid red;">
                                        <input ng-model="dayclear.incomplete_rate" type="text"
                                               placeholder="未达成率">
                                    </td>
                                    <td class="table-author am-hide-sm-only" style="border: 1px solid red;">
                                        <input ng-model="dayclear.remark" type="text"
                                               placeholder="备注">
                                    </td>

                                    <!--<td class="table-author am-hide-sm-only" style="...">{{ dayclear.task }}</td>
                                    <td ng-if="dayclear.result=='0'" class="table-author am-hide-sm-only" style="border: 1px solid red;">处理中</td>
                                    <td ng-if="dayclear.result=='1'" class="table-author am-hide-sm-only" style="border: 1px solid red;">已完成</td>
                                    <td class="table-author am-hide-sm-only" style="border: 1px solid red;">{{ dayclear.incomplete_rate }}</td>
                                    <td class="table-author am-hide-sm-only" style="border: 1px solid red;">{{ dayclear.remark }}</td>-->
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" id="SelectEmpDataSubmit"  ng-click="Update(dayclears)" class="btn btn-primary">
                    	更新
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<div class="modal fade" id="DayclearDataModal"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="z-index:9999;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title">
                    一周日清汇总
                </h4>
            </div>
            <div class="modal-body">
                <div id="dayclearChart" style="width: 600px;height:400px;"></div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>

                <button type="button"   ng-click="selectDayclearListByName(selectData)" class="btn btn-primary">

                    查询
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
